package org.platform.lwc.system.feign;


import org.platform.lwc.system.constant.SystemConstant;
import org.platform.lwc.tool.api.R;
import org.platform.lwc.tool.auth.domain.LoginUser;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * User Feign接口类
 *
 * @author lwc
 */
@FeignClient(
        contextId = "ISysUserClient",
        value = SystemConstant.APPLICATION_SYSTEM_NAME,
        path = SystemConstant.CONTEXT_PATH,
        fallback=ISysUserClientFallback.class
)
public interface ISysUserClient {

    String API_PREFIX = "/feign/sysUser";

    /**
     * 获取用户信息
     *
     * @param account  账号
     * @return
     */
    @GetMapping(API_PREFIX + "/userInfo")
    R<LoginUser> userInfo(@RequestParam("account") String account);

}
